import { BlackType, DirectionType, MoveKeyType } from ".";
import { moveBlack } from "./moveBlack";

export class AllMoveDirectionBlack extends moveBlack {
  moveKey: MoveKeyType;
  constructor({
    x,
    y,
    width,
    height,
    targter,
    speed,
    moveKey,
    isRadiusPoint,
    id,
  }: BlackType & { speed: number; moveKey: MoveKeyType; id?: string }) {
    super({ x, y, width, height, targter, speed, isRadiusPoint, id });
    this.moveKey = moveKey;
  }
  updateActionDirection(code: DirectionType | null) {
    this.actionDirection = code;
  }
  clearActionDirection(code: string) {
    this.actionDirection === code && (this.actionDirection = null);
  }
}
